<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
</head>

<body>

<table class="table table-striped" method="post" th:action="@{/user/userFrom}">
    <thead>
    <tr>
        <th scope="col">编号</th>
        <th scope="col">用户名</th>
        <th scope="col">密码</th>
        <th scope="col">账户余额</th>
        <th scope="col">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="user:${users}">
        <th scope="row" th:text="${user.getId()}"></th>
        <td th:text="${user.getUsername()}"></td>
        <td th:text="${user.getPassword()}"></td>
        <td th:text="${user.getBlance()}"></td>

        <td>
            <a class="btn btn-primary" th:href="@{'/updatePage/'+${user.id}}">更改</a>
            <a class="btn btn-danger" th:href="@{'/delete/'+${user.id}}">删除</a>
        </td>
    </tr>
    </tbody>
</table>
<button class="btn btn-block"><a th:href="@{/addH}">添加用户</a></button>

</body>

</html>